<template>
<div class="app">
  <div class="header">
    <van-nav-bar
      style="background-color: whitesmoke"
      left-arrow
      @click-left="$router.back()"
    />
  </div>
  <div class="content">
    <div class="box1">
      <div class="boxTop">
        <div class="box2">
          <span class="sp1">￥</span>
          <span class="sp2">{{userInfo.balance}}</span>
        </div>
        <div class="box3">
          <p>可用余额</p>
        </div>
      </div>
      <div class="boxBottom">
        <van-button class="btn" round color="#2DD9CF" plain @click="$router.push('/money')">充值</van-button>
      </div>
    </div>
  </div>
  <div class="bottom">
    <div class="bottom-t">
      <van-cell title="您未缴纳押金" class="cel" label="使用完成后，可随时提现押金" />
    </div>
    <div class="bottom-b">
      <van-cell title="交易明细" is-link to="deal" />
    </div>
  </div>
</div>
</template>

<script>

export default {
  name: 'wallet',
  components: {
  },
  props: {},
  data () {
    return {
      userInfo: {

      }
    }
  },
  computed: {

  },
  watch: {},
  created () {
    this.getRequest('/sys/vip/' + this.$store.state.user.user.id).then(({ data }) => {
      this.userInfo = data.data
    })
  },
  mounted () {
  },
  methods: {}
}
</script>

<style scoped>
*{
  padding: 0;
  margin: 0;
}
.header{
  background-color: #2DD9CF;
}
.app{
  width: 100%;
  height: 100%;
  background-color: #2DD9CF;
}
.content{
  height: 80%;
}
.bottom{
  height: 30%;
  border-top-left-radius: 30px;
  border-top-right-radius: 30px;
  width: 100%;
  background-color: white;
  position: absolute;
  bottom: 0;
}
.box1{
  position: relative;
  top: 100px;
  margin: 0 auto;
  width: 200px;
  height: 200px;
}
.boxTop{
  height: 150px;
  width: 200px;
}
.box2{
  position: relative;
  height: 100px;
  line-height: 100px;
  text-align: center;
  color: whitesmoke;
}
.sp1{
  color: #e9e9e9;
}
.sp2{
  font-size: 50px;
}
.box3{
  text-align: center
}
.box3>p {
  color: #e9e9e9;
}
.boxBottom{
  height: 50px;
  width: 200px;
  text-align: center;
}
.btn{
  width: 150px;
  font-size: 16px;
  font-weight: 700;
}
.bottom-t{
  height: 60px;
  line-height: 60px;
  margin: 40px 40px 20px 40px;
  border-bottom: 1px dashed gray;
}
.cel{
  color: coral;
  font-weight: 700;
  font-size: 16px;
}
.bottom-b{
  height: 40px;
  margin: 0 40px 0 40px;
}
</style>
